function shuzi(){//0-9有效
	if(window.event.keyCode>57||window.event.keyCode<48){
		window.event.keyCode = 0;
	}
}
function xiaoshu(){//0-9和“.”有效
	if(window.event.keyCode>57||window.event.keyCode<48 && window.event.keyCode != 46){
		window.event.keyCode = 0;
	}
}
function checkNumber(s){
	if(s.value=="")return;
	if(isNaN(s.value)){
		alert("\u4E0D\u662F\u6B63\u786E\u7684\u6570\u503C\u7C7B\u578B\uFF01");
		s.value = "";
	}
}
function getFs(){
	var altfs=0;
	var zf=document.getElementById("zf").value;	
	var sts=document.getElementById("sts").value;	
	var dxts_=document.getElementById("dxts_").value;	
	var dxfs=document.getElementById("dxfs").value;	
	var duxts_=document.getElementById("duxts_").value;		
	var duxfs=document.getElementById("duxfs").value;	
	var alts=document.getElementById("alts").value;	
	var slfs=(
	Number(zf)-
	(Number(dxts_)*Number(dxfs))-
	(Number(duxts_)*Number(duxfs))
	)/(Number(alts));
	//alert(Number(sts)*Number(anltbl)/100);
	//alert(slfs);
	if(alts!=0){
	document.getElementById("anltfs").value=slfs.toFixed(2);
	altfs=slfs.toFixed(2);
	}else{
	document.getElementById("anltfs").value=0;
	}
	//document.getElementById("jgf").value=zf*0.6;
	return altfs;
}

function stzf(){//当案例题数目为空 计算单选，多选的试题总分是否和设置总分相等
	var zf=Number(document.getElementById("zf").value);	
	var sts=Number(document.getElementById("sts").value);	
	var dxts_=Number(document.getElementById("dxts_").value);	
	var dxfs=Number(document.getElementById("dxfs").value);	
	var duxts_=Number(document.getElementById("duxts_").value);		
	var duxfs=Number(document.getElementById("duxfs").value);	
	var alts=Number(document.getElementById("alts").value);
	var flag=false;
	if(zf!=(dxts_*dxfs+duxts_*duxfs)){
		alert("单选题"+dxts_+"题，共"+dxts_*dxfs+"分 \n"
		+"多选题"+duxts_+"题，共"+duxts_*duxfs+"分 \n"
		+"单选题，多选题总分为"+(dxts_*dxfs+duxts_*duxfs)+"分，您设置的总分为"+zf+"。\n两分数不相等无法设置组卷规则！"
		);
		flag=true;
	}	
	return flag;
}
var submit=0;
